package com.ruoyi.play.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.play.mapper.RollCallRecordMapper;
import com.ruoyi.play.domain.RollCallRecord;
import com.ruoyi.play.service.IRollCallRecordService;

/**
 * 点名记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-07
 */
@Service
public class RollCallRecordServiceImpl implements IRollCallRecordService 
{
    @Autowired
    private RollCallRecordMapper rollCallRecordMapper;

    /**
     * 查询点名记录
     * 
     * @param id 点名记录主键
     * @return 点名记录
     */
    @Override
    public RollCallRecord selectRollCallRecordById(Long id)
    {
        return rollCallRecordMapper.selectRollCallRecordById(id);
    }

    /**
     * 查询点名记录列表
     * 
     * @param rollCallRecord 点名记录
     * @return 点名记录
     */
    @Override
    public List<RollCallRecord> selectRollCallRecordList(RollCallRecord rollCallRecord)
    {
        return rollCallRecordMapper.selectRollCallRecordList(rollCallRecord);
    }

    /**
     * 新增点名记录
     * 
     * @param rollCallRecord 点名记录
     * @return 结果
     */
    @Override
    public int insertRollCallRecord(RollCallRecord rollCallRecord)
    {
        rollCallRecord.setCreateTime(DateUtils.getNowDate());
        return rollCallRecordMapper.insertRollCallRecord(rollCallRecord);
    }

    /**
     * 修改点名记录
     * 
     * @param rollCallRecord 点名记录
     * @return 结果
     */
    @Override
    public int updateRollCallRecord(RollCallRecord rollCallRecord)
    {
        rollCallRecord.setUpdateTime(DateUtils.getNowDate());
        return rollCallRecordMapper.updateRollCallRecord(rollCallRecord);
    }

    /**
     * 批量删除点名记录
     * 
     * @param ids 需要删除的点名记录主键
     * @return 结果
     */
    @Override
    public int deleteRollCallRecordByIds(Long[] ids)
    {
        return rollCallRecordMapper.deleteRollCallRecordByIds(ids);
    }

    /**
     * 删除点名记录信息
     * 
     * @param id 点名记录主键
     * @return 结果
     */
    @Override
    public int deleteRollCallRecordById(Long id)
    {
        return rollCallRecordMapper.deleteRollCallRecordById(id);
    }
}
